package com.wangbaokang.duanxin.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MySliteHelper extends SQLiteOpenHelper {

	public MySliteHelper(Context context, String name, int version) {
		super(context, name, null, version);
	}

	/**
	 * Ⱥ��ı���
	 */
	public static final String TABLE_GROUPS ="groups";
	/**
	 * �Ự��Ⱥ���Ӧ��ϵ ���� 
	 */
	public static final String TABLE_THREAD_GROUPS ="thread_groups";
	
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		//����Ⱥ����Ʊ�
		db.execSQL("create table groups(_id integer primary key autoincrement,name varchar(20));");

		//����Ⱥ��ͻỰ��Ӧ��ϵ ��
		db.execSQL("create table thread_groups(_id integer primary key autoincrement,thread_id integer,group_id integer);");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}

}
